package com.oo.inherit_3.solider;

/**
 * Doctor--${description}
 *
 * @author: Jovi
 * @createTime: 2017-05-09 14:40
 **/
public class Doctor extends Person{

    private String section;

    public Doctor() {
    }

    public Doctor(String name, int age, String sex, String duty, String section) {
        super(name, age, sex, duty);
        this.section = section;
    }

    @Override
    protected void work() {
        System.out.println("姓名："+this.getName()
        +"\n职业：医生\n年龄："+this.getAge()
        +"\n所在科室："+this.getSection()
        +"\n职务："+this.getDuty());
    }

    public String getSection() {
        return section;
    }

    public void setSection(String section) {
        this.section = section;
    }
}
